﻿using Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Util.Props;

namespace Common
{
    public interface ILoader : IConfigurable
    {
        /**
       /// Loads the acoustic model.
        *
       /// @throws IOException if an error occurs while loading the model
        */
        void load();

        /**
       /// Gets the pool of means for this loader.
        *
       /// @return the pool
        */
        Pool<float[]> getMeansPool();

        /**
        /// Gets the means transformation matrix pool.
         *
        /// @return the pool
         */
        Pool<float[][]> getMeansTransformationMatrixPool();

        /**
        /// Gets the means transformation vectors pool.
         *
        /// @return the pool
         */
        Pool<float[]> getMeansTransformationVectorPool();

        /**
        /// Gets the variance pool.
         *
        /// @return the pool
         */
        Pool<float[]> getVariancePool();

        /**
        /// Gets the variance transformation matrix pool.
         *
        /// @return the pool
         */
        Pool<float[][]> getVarianceTransformationMatrixPool();

        /**
        /// Gets the variance transformation vectors pool.
         *
        /// @return the pool
         */
        Pool<float[]> getVarianceTransformationVectorPool();

        /**
        /// Gets the mixture weight pool.
         *
        /// @return the pool
         */
        Pool<float[]> getMixtureWeightPool();

        /**
        /// Gets the transition matrix pool.
         *
        /// @return the pool
         */
        Pool<float[][]> getTransitionMatrixPool();

        /**
        /// Gets the transformation matrix.
         *
        /// @return the matrix
         */
        float[][] getTransformMatrix();

        /**
        /// Gets the senone pool for this loader.
         *
        /// @return the pool
         */
        Pool<ISenone> getSenonePool();

        /**
        /// Returns the HMM Manager for this loader.
         *
        /// @return the HMM Manager
         */
        IHMMManager getHMMManager();

        /**
        /// Returns the map of context indepent units. The map can be accessed by unit name.
         *
        /// @return the map of context independent units
         */
        Dictionary<String, IUnit> getContextIndependentUnits();

        /** logs information about this loader */
        void logInfo();

        /**
        /// Returns the size of the left context for context dependent units.
         *
        /// @return the left context size
         */
        int getLeftContextSize();

        /**
        /// Returns the size of the right context for context dependent units.
         *
        /// @return the left context size
         */
        int getRightContextSize();

        /**
        /// Returns the model properties
         */
        Dictionary<String, Object> getProperties();

        /**
       /// Apply the transform
        */
        void update(ITransform transform, IClusteredDensityFileData clusters);
    }
}
